public class Test {

    public static void main(String[] args) {
        LinkedList linkedList = new LinkedList();
        linkedList.addFirst(2);
        linkedList.addFirst(3);
        linkedList.addFirst(4);
        linkedList.addFirst(9);
        linkedList.display();
        System.out.println();
        linkedList.addLast(5);
        linkedList.addLast(888);
        linkedList.addLast(777);
        linkedList.display();
        System.out.println();
        linkedList.addIndex(0,123);
        linkedList.addIndex(3,1234);
        linkedList.addIndex(8,12356);
        linkedList.display();
        System.out.println();
        System.out.println(linkedList.contains(123));
        System.out.println(linkedList.contains(777));
        System.out.println(linkedList.contains(1234));
        System.out.println(linkedList.contains(9999999));
        linkedList.remove(123);
        linkedList.remove(777);
        linkedList.remove(1234);
        linkedList.display();
        System.out.println();
        LinkedList linkedList1 = new LinkedList();
        linkedList1.addFirst(2);
        linkedList1.addFirst(2);
        linkedList1.addLast(2);
        linkedList1.addLast(23);
        linkedList1.addLast(2);
        linkedList1.display();
        linkedList1.removeAllKey(2);
        linkedList1.display();
    }
}
